package com.itl.train.service.impl;

import com.itl.train.entity.Company;
import com.itl.train.mapper.CompanyMapper;
import com.itl.train.service.CompanyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 胡广
 * @date 2020-11-06
 * @since JDK1.8
 */
@Service
public class CompanyServiceImpl implements CompanyService {

    @Autowired
    private CompanyMapper companyMapper;


    @Override
    public List<Company> getByCodeAndName(String code, String name) {
        return companyMapper.getByCodeAndName(code,name);
    }

    @Override
    public Company getById(String id) {
        return companyMapper.getById(id);
    }

    /**
     * 公司查询
     * @param company
     * @return
     */
    @Override
    public List<Company> query(Company company) {
        return companyMapper.query(company);
    }
}
